﻿using System;
using System.Linq;
using System.IO.IsolatedStorage;
using EnsureWeb.Web.DataModel;

namespace EnsureWeb.UI.Core
{
    public class IsolatedStorageContext
    {
        //public Member GetUser()
        //{
        //    if (appSettings.Contains(userKey))
        //        return appSettings[userKey] as Member;
        //    else
        //        return new Member();
        //}
        
        //public void SaveUser(Member user)
        //{
        //    if (!appSettings.Contains(userKey))
        //        appSettings.Add(userKey, user);
        //    else
        //        appSettings[userKey] = user;

        //    appSettings.Save();
        //}

        //public void ClearUser()
        //{
        //    appSettings.Remove(userKey);
        //    appSettings.Save();
        //}
        
        private IsolatedStorageSettings appSettings = IsolatedStorageSettings.ApplicationSettings;
        private readonly string userKey = "currentUser";
    }
}
